#ifndef __LobbyScene_H__
#define __LobbyScene_H__

#include "cocos2d.h"

class cocos2d::CCMenuItemImage;

class LobbyScene : public cocos2d::CCLayer
{
public:
    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();  

    // there's no 'id' in cpp, so we recommand to return the exactly class pointer
    static cocos2d::CCScene* scene();

private:
    // a selector callback
    void newGameCallback(CCObject* pSender);

	void onCreateGameSucceed(CCObject* pSender);

	void onCreateGameFailed(CCObject* pSender);

	// resume
	void onResumeCallback(CCObject* pSender);

	void updateRequest(float deltaTime);

	void onUpdateRequestSucceed(CCObject* pSender);

	void onUpdateRequestFailed(CCObject* pSender);

	void handleMessage(CCObject* pSender);

    // implement the "static node()" method manually
    LAYER_CREATE_FUNC(LobbyScene);

	cocos2d::CCMenuItemImage* mNewGameButton;
};

#endif // __HELLOWORLD_SCENE_H__
